package com.terrace.core.spring.datasource.lookup;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * 动态数据源
 * 
 * @author jiangyg
 *
 */
public class DynamicDataSource extends AbstractRoutingDataSource {

	/**
	 * 动态获取当前线程配置的数据源
	 */
	@Override
	protected Object determineCurrentLookupKey() {
		return DataSourceHolder.getDataSource();
	}

}
